package com.hbase.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import java.util.HashMap;
import java.util.Map;

/**
 * @description: hbase属性
 * @author: zyj
 * @create: 2019-12-12 14:20
 **/
@Component("hBaseConfigProperties")
@PropertySource("classpath:hbase-configure.properties")
@ConfigurationProperties(prefix = "hbase")
@Validated
public class HBaseConfigProperties {

    // prefix的值+data变量名为properties key的前一部分, 将key剩余的部分作为map的key, value作为map的value
    public Map<String, String> config = new HashMap();

    public Map<String, String> getConfig() {
        return config;
    }

    public void setConfig(Map<String, String> config) {
        this.config = config;
    }
}
